// 很容易考

function enumerateObjectPaths(obj, currentPath = "", paths = []) {
    for (let key in obj) {
        let newPath = currentPath? `${currentPath}.${key}` : key;
        paths.push(newPath);
        if (typeof obj[key] === "object" && obj[key]!== null) {
            // 如果属性值还是对象，则递归调用继续枚举其内部属性路径
            enumerateObjectPaths(obj[key], newPath, paths);
        }
    }
    return paths;
}

// 示例对象
let myObject = {
    name: "Alice",
    age: 25,
    address: {
        city: "New York",
        street: "Broadway"
    },
    hobbies: ["reading", "swimming"]
};

let paths = enumerateObjectPaths(myObject);
console.log(paths);